﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AviumX.AviumCore.Screen.Desktop
{
    class Desktop
    {
       // public static API.Controls.Textbox TextBox = new API.Controls.Textbox();
       // private static API.Controls.Button Button = new API.Controls.Button();
      //  private static API.Controls.Label Label = new API.Controls.Label();
        private static WinAPI.Window parent = new WinAPI.Window(20, 40, 100, 50, "");
        
        public static void DoDesktop()
        {

            CreateScreen.TheScreen.ClearBufferToSystemColor(ScreenX.SystemColors.AliceBlue);
            //Core.Screen.Desktop.Addons.StatusBar.Draw();
            //Core.Screen.Desktop.Addons.WarningBar.Draw();
            //Core.Screen.Desktop.Addons.ReflectiveLight.Draw();
            //Center the Logo. And draw it.
            AviumX.AviumCore.Screen.Graphics.Images.AviumXLogo.Draw(CreateScreen.TheScreen.Width / 2 - 32 / 2, CreateScreen.TheScreen.Height / 2 - 34 / 2, ScreenX.SystemColors.Black);
            //actualram = Cosmos.Core.CPU.GetAmountOfRAM() + 2;
            Graphics.StringPrintIn.Print("Avium Desktop", 132, 130, ScreenX.SystemColors.Black, Graphics.Fonts.Font.Fonts.EnvySys);
            //Core.Graphics.String.Print("Running:" + Core.API.WindowHandler.GetCurrentPrograms(), 95, 145, Core.Screen.ScreenHandler.SystemColors.Black, Core.Graphics.Font.Font.Fonts.EnvySys);
            //Core.Graphics.String.Print("FPS:" + Core.System.Throttle.GetSpeed(), 95, 153, Core.Screen.ScreenHandler.SystemColors.Black, Core.Graphics.Font.Font.Fonts.EnvySys);
            //Draw all icons.
            //Core.Screen.Desktop.Addons.IconManager.Draw();
            if (AviumX.AviumCore.Hardware.Keyboard.KeyBoardCreated.TheKeyBoard.GetkeyPress() == "x")
            {
               // Core.Screen.Error.start();
            }
            /*
             * Update running windows.
             */
            WinAPI.Windows.StartAWindow(parent);
            parent.Draw();
            parent.ActivateWindow();
            WinAPI.Windows.UpdateAllWindows();
        }
    }
}
